package com.flashflexpro.flexdirector.conn {

import flash.events.Event;

public class RemoteCallingEvent extends Event{


    public static const TYPE:String = "connEvent";


    public static const CONNECTED:String = "connected";
    public static const DISCONNECTED:String = "disconnected";

    public static const FLEX_DIRECTOR_CONNECTION_ID:String ="flexDirectorConnectionId";
    public static const TEMP_APP_INST_PRIFEX:String = "__TmpAppInst";
    public static const FLEX_DIRECTOR_SERVER:String ="flexDirectorServer";

    public static const IP_ADDRESS_REG_EXP:RegExp = /\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/;

    public static const _c2aEnv:String = "c2aEnv";
    public static const _c2aRecording:String = "c2aRecording";
    public static const _a2cOnActionEvent:String = "a2cRecordsReady";

    public static const _c2aChecking:String = "c2aChecking";
//    public static const _a2cOnCheckEvent:String = "a2cCheckProperties";

    public static const _c2aRunExeSwf:String = "c2aExecut";
    
    public static const _a2cStepError:String = "_a2cStepError";
    public static const _a2cStepFinish:String = "_a2cStepFinish";
    public static const _a2cStepWaiting:String = "_a2cStepWaiting";
    public static const _a2cProcedureStart:String = "_a2cProcedureStart";
    public static const _a2cProcedureSuceeded:String = "_a2cProcedureSuceeded";
    public static const _a2cProcedureFailed:String = "_a2cProcedureFailed";


    public static const _a2cPing:String = "ping ing";
    public static const _c2aRunExeBuiltIn:String = "runBuiltInTestCase";
    public static const _a2cExit:String = "exit";
    public static const _a2cBegin:String = "begin";

    public function RemoteCallingEvent( methodName:String, args:Array = null) {
        super( TYPE );
        _methodName = methodName;
        _args = args;
        _createTime = new Date().getTime();
    }

    private var _createTime:int;
    private var _methodName:String;
    private var _args:Array;

    public function get createTime():uint{
        return _createTime;
    }


    public function get methodName():String {
        return _methodName;
    }

    public function get args():Array {
        return _args;
    }


    override public function clone():Event {
        return new RemoteCallingEvent( _methodName, _args );
    }


    override public function toString():String {
        return "ConEvent[ methodName:" + _methodName + "(" + _args + ")]";
    }
}
}